home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 138
/
Volume 138 Aug 19 2011 - Damaged.iso
/
Games
/
tobby_on_ice.swf
/
scripts
/
DefineSprite_63_lastSec
/
frame_1
/
DoAction.as
Wrap
Text File
|
2011-08-19
|
1KB
|
62 lines
function dispTime()
{
var _loc1_ = this;
if(_loc1_.frmTimerMode)
{
var _loc2_ = Math.floor(_loc1_.frmCnt / _loc1_.frmSpeed);
_loc1_.frmCnt = _loc1_.frmCnt + 1;
}
else
{
_loc2_ = Math.floor((getTimer() - _loc1_.startTime) / 1000);
}
_loc1_.dispSec = _loc1_.lastSec - _loc2_;
}
function setClock(nSec)
{
var _loc1_ = this;
_loc1_.lastSec = nSec;
_loc1_.dispSec = _loc1_.lastSec;
}
function startClock()
{
var _loc1_ = this;
_loc1_.startTime = getTimer();
_loc1_.frmCnt = 0;
_loc1_.doFlg = true;
}
function stopClock()
{
this.doFlg = false;
}
function pauseOn()
{
var _loc1_ = this;
_loc1_.pauseTime = getTimer() - _loc1_.startTime;
_loc1_.doFlg = false;
}
function pauseOff()
{
var _loc1_ = this;
_loc1_.startTime = getTimer() - _loc1_.pauseTime;
_loc1_.doFlg = true;
}
function getLastSec()
{
return this.dispSec;
}
function timeUp()
{
this.stopClock();
if(this.getGoldCnt >= 20)
{
_root.playerNum = _root.playerNum + 1;
}
_root.tobbyMC.setMissFromClock();
}
this.dispSec = 0;
this.doflg = false;
this.frmTimerMode = true;
this.frmSpeed = 15;
this.frmCnt = 0;